# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-mux
_pkgname=mux
_vendor=gorilla
pkgver=1.7.3
pkgrel=5
pkgdesc="A powerful URL router and dispatcher for golang"
url="https://www.gorillatoolkit.org/"
arch="noarch"
license="BSD-3-Clause"
depends="go"
subpackages="$pkgname-doc"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/gorilla/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	return 0
}

package() {
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.* \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$_pkgname
	done
	mv -- *.go "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="
90e3da0f680ea0cf8d771cae9cbb5e35867f0e0a08f9ab7d22048b19851b57f1353f435abff7ea1db3c190081e363092e93cd6a57c2a64b6531458c2f6054365  go-mux-1.7.3.tar.gz
"
